package com.tiku.advice;

import com.tiku.common.ResultJson;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class ExceptionSupport {


    @ExceptionHandler(TokenException.class)
    public ResultJson doException(TokenException e){
        e.printStackTrace();
        return ResultJson.error(e.getMessage());
    }

}
